package com.ruoyi.backend.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {

    public interface Register{
    }

    public interface AddUser{
    }

    public interface Update{
    }

    @NotNull(groups = {Update.class},  message = "用户ID不能为空")
    private Integer id;

    @NotNull(groups = {Register.class, AddUser.class},  message = "用户名不能为空")
    private String username;

    @NotNull(groups = {Register.class, AddUser.class},  message = "密码不能为空")
    private String password;

    @NotNull(groups = {Register.class, AddUser.class},  message = "邮箱不能为空")
    private String email;

    @NotNull(groups = {Register.class, AddUser.class},  message = "姓名不能为空")
    private String name;

    @NotNull(groups = {AddUser.class},  message = "角色不能为空")
    private Integer role;

}
